#include "net/EventLoop.h"
#include "Base/Logger.h"
#include <thread>

void func() {
    LOG_INFO << "func()";
}

using namespace toym;
using namespace toym::net;

EventLoop* g_loop;

void threadFunc() {
    g_loop->runInLoop(func);
}

int main() {
    EventLoop loop;
    g_loop = &loop;
    std::thread t(threadFunc);
    loop.loop();
    t.join();
}